package se.webbzon.oschi01.gui;

import java.awt.Dimension;
import java.awt.Point;
import java.io.IOException;

import se.webbzon.oschi01.singleton.Singleton;

public class NBTIconSheet extends IconSheet<Byte> implements Singleton {
	
	private static final int iconWidth = 16, iconHeight = 16;
	
	private NBTIconSheet() throws IOException {
		super(	NBTIconSheet.class.getClass().getResource("/assets/Nbtsheet.png"),
				new Dimension(iconWidth,iconHeight));
		
		Point[] offsets = new Point[12];
		offsets[0] = new Point(3,2);
		offsets[1] = new Point(0,0);
		offsets[2] = new Point(1,1);
		offsets[3] = new Point(3,0);
		offsets[4] = new Point(0,1);
		offsets[5] = new Point(2,0);
		offsets[6] = new Point(1,0);
		offsets[7] = new Point(0,2);
		offsets[8] = new Point(2,1);
		offsets[9] = new Point(2,2);
		offsets[10] = new Point(3,1);
		offsets[11] = new Point(1,2);
		
		for (byte b = 0; b < 12; b++) {
			Point p = offsets[b];
			defineIcon(b,p.x,p.y);
		}
	}

}
